package com.ruoyi.system.service.assets.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.assets.FzBusinessFloor;
import com.ruoyi.system.mapper.assets.FzBusinessFloorMapper;
import com.ruoyi.system.service.assets.IFzBusinessFloorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 楼栋信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-02-28
 */
@Service
public class FzBusinessFloorServiceImpl implements IFzBusinessFloorService
{
    @Autowired
    private FzBusinessFloorMapper fzBusinessFloorMapper;

    /**
     * 查询楼栋信息
     * 
     * @param floorId 楼栋信息ID
     * @return 楼栋信息
     */
    @Override
    public FzBusinessFloor selectFzBusinessFloorById(String floorId)
    {
        return fzBusinessFloorMapper.selectFzBusinessFloorById(floorId);
    }

    /**
     * 查询楼栋信息列表
     * 
     * @param fzBusinessFloor 楼栋信息
     * @return 楼栋信息
     */
    @Override
    public List<FzBusinessFloor> selectFzBusinessFloorList(FzBusinessFloor fzBusinessFloor)
    {
        return fzBusinessFloorMapper.selectFzBusinessFloorList(fzBusinessFloor);
    }

    /**
     * 新增楼栋信息
     * 
     * @param fzBusinessFloor 楼栋信息
     * @return 结果
     */
    @Override
    public int insertFzBusinessFloor(FzBusinessFloor fzBusinessFloor)
    {
        fzBusinessFloor.setCreateTime(DateUtils.getNowDate());
        return fzBusinessFloorMapper.insertFzBusinessFloor(fzBusinessFloor);
    }

    /**
     * 修改楼栋信息
     * 
     * @param fzBusinessFloor 楼栋信息
     * @return 结果
     */
    @Override
    public int updateFzBusinessFloor(FzBusinessFloor fzBusinessFloor)
    {
        return fzBusinessFloorMapper.updateFzBusinessFloor(fzBusinessFloor);
    }

    /**
     * 删除楼栋信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzBusinessFloorByIds(String ids)
    {
        return fzBusinessFloorMapper.deleteFzBusinessFloorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除楼栋信息信息
     * 
     * @param floorId 楼栋信息ID
     * @return 结果
     */
    @Override
    public int deleteFzBusinessFloorById(String floorId)
    {
        return fzBusinessFloorMapper.deleteFzBusinessFloorById(floorId);
    }
}
